package com.matt.repository.rel;

import com.matt.domain.rel.RelClassesCourseTopic;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2018/3/19
 * *******************************
 */
public interface RelClassesCourseTopicRepository extends JpaRepository<RelClassesCourseTopic, String> {

    @Transactional
    @Modifying
    Long deleteByTopicId(String topicId);

    @Modifying
    Long deleteByTopicIdAndClassesId(String topicId, String classesId);
}
